[Author] Lisztdreams
Contact: 5Mods ID: Lisztdreams
         QQ Email: 757946163@qq.com
         Bilibili UID: 452301387
Last Update: 2026.04.22
(Do not modify, repackage, distribute or sell without permission)

------------------ Basic Introduction ---------------------
WaterTemp - Realistic Engine Water Temperature Simulation Script

Adds a layer of realism and strategy to your GTA V driving experience.

This is a completely independent .cs script that introduces a dynamic, realistic engine water temperature simulation for all vehicles in the game. Your driving habits, weather, and vehicle speed directly affect the water temperature. Overheating can cause engine damage or even complete failure.

【Required Plugins】

This script is built on ScriptHookVDotNet. Please ensure the following dependencies are correctly installed before running:

- ScriptHookV (http://www.dev-c.com/gta5/scripthookv)
- dinput8.dll (included with ScriptHookV)
- ScriptHookVDotNet v3.7.0-nightly.78 or higher (https://github.com/scripthookvdotnet/scripthookvdotnet-nightly/releases)
- .NET Framework 4.8 or higher

(Note: DashHook is optional, not required)

【Fully functional standalone, still hardcore without DashHook】

Even if you don't have DashHook installed, WaterTemp is a fully featured standalone script. It has its own on‑screen HUD temperature bar and numeric display, giving the player clear visual warnings. That means you get a complete feedback loop without any external plugins – from real‑time water temperature display to visual overheating warnings, and finally to engine failure punishment.

Of course, if you also install IkT's DashHook script, WaterTemp can go further by writing the water temperature data into the vehicle's dashboard coolant gauge and keeping the engine warning light on when overheating, achieving consistency between the HUD and the physical gauge.

【Temperature Rise Logic (when engine is running)】

When the engine is running, the water temperature rises based on real‑world physics:

1. BaseRiseRate: The inherent heat generation rate when the engine is idling.
2. RPMRiseMultiplier: The harder you press the gas, the higher the RPM, the faster the engine heats up.
3. Environment & Weather: Hot, sunny days increase the heating rate; rain, snow, fog, or night time reduce it.
4. Nonlinear Temperature Factor (BaseRiseMinFactor): The temperature rises relatively slowly in the low zone (0-90°C). Once it enters the high zone (above 110°C), heat builds up faster and the temperature rises more quickly.

【Temperature Cooling / Heat Dissipation Factors】

Cooling happens through three methods, which can work together:

- Natural cooling (BaseFallRate): When the engine is off, the temperature slowly drops based on the difference between current and ambient temperature, eventually returning to ambient.
- Movement cooling (MovementCoolingBase): This is the most effective cooling method. The faster you drive, the stronger the cooling (maximum effect controlled by MaxSpeedForCooling). High‑speed cruising is the key to keeping temperatures under control.
- Thermostat: Simulates a real vehicle’s thermostat, which automatically controls the flow of coolant between the engine and radiator, keeping the engine running at its optimal temperature (around 85-100°C).

【Overheat Consequences & Punishment】

When the water temperature exceeds 150°C, serious mechanical failure is triggered, making reckless driving costly:

- Engine destruction (ForceEngineDeadAtMax): At 150°C, the engine is immediately destroyed and forced to shut down, and cannot be restarted.
- High‑temperature durability loss: Once the temperature exceeds 111°C, engine health continuously decreases as temperature rises until complete failure.
- Engine warning light: When the temperature reaches about 120°C, the vehicle’s dashboard engine warning light turns on, reminding you to slow down to cool off or stop to let it cool.
- Repair reset: Only by taking the vehicle to Los Santos Customs or using a trainer to repair the engine will the water temperature reset to ambient and the vehicle return to normal.

【Deep Integration with DashHook (optional enhancement, tested with DashHook v1.01)】

If you have IkT's DashHook installed (https://www.gta5-mods.com/tools/dashhook), WaterTemp will automatically enable advanced integration:

- Dashboard sync: The script writes its calculated temperature as a normalized value into DashHook’s memory structures.
- Consistent gauge reading: The dashboard coolant needle is directly driven by WaterTemp. The needle position matches the HUD temperature percentage exactly.
- Dashboard engine warning light: The engine warning light on the dashboard stays on when the vehicle is overheating.
- Per‑vehicle Pivot calibration: In WaterTemp.ini, you can set custom PivotTemp and PivotNormalized values for specific vehicles (e.g., some modded cars with inaccurate gauges) to perfectly match the dashboard needle logic.

【Other Notable Details】

- Per‑vehicle tracking: The script stores the state of the last few vehicles you drove (default 3). You can change the maximum. When you switch vehicles, the water temperature data is preserved.
- Highly configurable INI file: Auto‑generated on first run. You can adjust HUD position/color/size, heating/cooling rates, reload hotkey (default F5), environment transition speed, and everything else.
- Per‑vehicle fine‑tuning: In the INI file, use a section like [Vehicle:modelName_or_0xHASH] to set more aggressive or gentler heating logic for a specific vehicle.
- Debug mode: Set DebugMode=1. When you enter a vehicle, the script will show its model name and hash, making it easy to write custom configs for specific vehicles.

【Installation & Usage】

1. Place WaterTemp.cs into your scripts folder.
2. Launch the game – the script will automatically generate WaterTemp.ini.
3. (Optional) Install IkT’s DashHook for dashboard gauge sync.
4. Press F5 to reload the configuration file at any time without restarting the game.

Changelog

v2.6
New: Thermostat damage mechanics

In the real world, the thermostat controls coolant circulation and helps the engine warm up quickly and maintain its optimal operating temperature (about 85-100°C). In v2.6, the thermostat is not always reliable – after collisions, bottoming out, falling from heights, explosion blasts, or prolonged hard off‑roading, the thermostat can get stuck or fail completely.

Failure effects: When the thermostat fails, the large cooling circuit is blocked, greatly reducing cooling efficiency. Even when driving slowly or idling, the water temperature rises very quickly, easily exceeding the normal operating range and racing toward the limit.

Consequences: Once the temperature is out of control, the engine rapidly overheats, engine health continuously drops, until it fails completely and shuts down. The dashboard engine warning light will stay on after failure, telling the driver to pull over and turn off the engine immediately.

Recovery: Only by taking the vehicle to Los Santos Customs or using a trainer to fully repair the vehicle will the thermostat be restored, cooling return to normal, and water temperature reset to ambient.

This mechanic adds strategy to every hard collision, jump landing, or even off‑road police chase – you now have to protect the engine from physical shocks, because a single hit can break the thermostat and make the temperature gauge spike instantly.

------------------ Config File Parameters & Comments ---------------------

[General]
MaxTracked = (Maximum number of tracked vehicles. The script will remove the oldest entries to stay within this limit. Increasing this tracks more vehicles but uses more memory/CPU. Decreasing lowers overhead. Recommended 1–20, adjust based on how many different vehicles you drive.)
TickIntervalMs = (How often the script updates per frame. Lower values are more real‑time but use more CPU. Higher values save performance but add lag. Recommended 1–50.)
HeavyUpdateMs = (Heavy‑load update interval in milliseconds. Operations like World.GetAllVehicles and temperature updates for all tracked entries run only every this many milliseconds. Increasing this significantly reduces CPU load but reduces tracking/update precision. Recommended 100–1000, adjust based on your performance.)
DebugMode = (Debug/developer mode. 0 = off (default) – no load/reload/error messages for a clean UI. 1 = on – shows script load, INI reload, debug errors, vehicle hex hash and model name notifications, useful for debugging and calibration.)
ReloadHotkey = (Hotkey to reload the INI file (integer value from System.Windows.Forms.Keys enum). Example: 116 = F5. Change this to your preferred key.)
PivotTemp = (Global base temperature in °C. Used to map the script’s internal 0–150°C to DashHook’s 0–1 normalized value for gauge calibration. Must be between 0 and 150.)
PivotNormalized = (Global base normalized position (0–1). Defines where the gauge needle should point when the temperature equals PivotTemp.)

[Rates]
BaseRiseRate = (Base heating rate when the engine is running (idle/low load). Increase this to make the engine heat up faster even at idle. Fine‑tune to your liking, typically 0.1–10.)
BaseFallRate = (Natural cooling rate when the engine is off or not running. Increase for faster cooling. Typically 0.1–5.)
RPMRiseMultiplier = (Additional heating multiplier based on engine RPM. Increase to make high RPM cause more heat, simulating higher temperature under heavy throttle.)
MovementCoolingBase = (Base movement cooling amount. Increase for more effective cooling at high speeds.)
MaxSpeedForCooling = (Speed threshold for maximum wind cooling effect in m/s (default 41.67 ≈ 150 km/h). At this speed or higher, cooling reaches its maximum. Simulates reduced airflow gain at very high speeds due to aerodynamic stall.)
BaseRiseMinFactor = (Simulates the thermal equilibrium after the thermostat opens, mainly affecting the 90°C–110°C range. Lower values give a stronger effect.)

[HUD]
PosX = (Screen X coordinate for the center of the HUD temperature bar (relative 0–1). 0 = left edge, 1 = right edge.)
PosY = (Screen Y coordinate for the center of the HUD temperature bar (relative 0–1). 0 = top edge, 1 = bottom edge.)
Width = (Width of the HUD temperature bar (relative to screen width).)
Height = (Height of the HUD temperature bar (relative to screen height).)
BackgroundAlpha = (Background transparency of the HUD (0–1). 0 = fully transparent, 1 = fully opaque.)
BorderPadFactor = (Edge padding between the background and the progress bar. Increase to make the background appear larger than the progress bar.)

[Text]
TextPosX = (Screen X coordinate for the temperature text (relative 0–1).)
TextPosY = (Screen Y coordinate for the temperature text (relative 0–1).)
TextScale = (Text scale factor. Larger values make the text bigger.)
TextR = (Red channel for text color (0–255).)
TextG = (Green channel for text color (0–255).)
TextB = (Blue channel for text color (0–255).)
TextA = (Text transparency (0–255). 255 = fully opaque.)
TextUpdateIntervalSeconds = (Minimum interval between text updates in seconds. Reduces text rendering frequency. Recommended 0.01–0.2 – smaller values are more real‑time but cost more performance.)

[Vehicle:0xXXXXXXXX] (Custom vehicle water temperature parameters. Use the vehicle’s hex hash to override rates for specific models. If you don’t know the hash, set DebugMode=1, reload the config, then enter the vehicle – a popup will show the hash and model name.)
BaseRiseRate = 
MovementCoolingBase = 
MaxSpeedForCooling = 
BaseRiseMinFactor = 
PivotTemp = (Per‑vehicle PivotTemp for calibrating the dashboard gauge. When driving this vehicle and this value is set, it overrides the global setting.)
PivotNormalized = (Per‑vehicle PivotNormalized. When set, overrides the global value for this vehicle.)

Example custom vehicle:
[Vehicle:0x360A438E]
BaseRiseRate = 1
MovementCoolingBase = 0.125
MaxSpeedForCooling = 41.67
BaseRiseMinFactor = 0.05
PivotTemp = 90.0
PivotNormalized = 0.5